package cn.rocksolid.sport.common.http;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * RockSolid context token based on shiro framework
 *
 * @author Axl Zhao
 * @email axl.zhao@163.com
 */
public class RockSolidContextToken implements AuthenticationToken {

  /**
   * serialVersionUID
   */
  private static final long serialVersionUID = 1L;

  private final String token;

  public RockSolidContextToken(String token) {
    this.token = token;
  }

  @Override
  public String getPrincipal() {
    return token;
  }

  @Override
  public Object getCredentials() {
    return getPrincipal();
  }
}
